package com.itlong.cloud.property.dao;

import com.itlong.cloud.POJO.VO.app.AppElevatorMealPayRecordInfoVO;
import com.itlong.cloud.POJO.VO.property.PropertyPaymentRecordVO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;
import java.util.Map;

/**
 * <desc>
 *      物业缴费管理数据访问接口
 * </desc>
 *
 * @createDate2020/7/15
 **/
@Mapper
@Repository
public interface IPropertyPaymentDao {

    /**
     * <desc>
     *      分页查询缴费记录
     * </desc>
     *
     * @param params 参数Map
     * @return
     * @Author Zhu.yj
     * @createDate  2020/7/15
     */
    List<PropertyPaymentRecordVO> getPage(Map<String, Object> params);

    /**
     * <desc>
     *      统计缴费记录数量
     * </desc>
     *
     * @param params 参数Map
     * @return
     * @Author Zhu.yj
     * @createDate  2020/7/15
     */
    Integer getPageCount(Map<String, Object> params);

    /**
     * <desc>
     *     查询缴费记录列表
     * </desc>
     *
     * @param params 参数Map
     * @return
     * @author Qiang.S
     * @createDate 2020/07/16
     */
    List<PropertyPaymentRecordVO> getPayMonthByRoom(Map<String, Object> params);

    /**
     * <desc>
     *     查询缴费记录列表
     * </desc>
     *
     * @param paymentIds 缴费记录编号集合
     * @return
     * @author Qiang.S
     * @createDate 2020/07/16
     */
    List<AppElevatorMealPayRecordInfoVO> getPayMonthByPaymentId(@Param("paymentIds") String[] paymentIds);

    /**
     * <desc>
     *      获取缴费记录总金额
     * </desc>
     *
     * @param params 参数map
     * @return
     * @Author Zhu.yj
     * @createDate  2020/7/20
     */
    String getPaymentPriceCount(Map<String, Object> params);

    /**
     * <desc>
     *      检查活动套餐是否在当前房间使用过
     * </desc>
     *
     * @param mealId 套餐编号
     * @param roomId 房间ID
     * @return
     * @Author Zhu.yj
     * @createDate  2020/7/20
     */
    Integer checkMealInfo(@Param("mealId") String mealId, @Param("roomId") String roomId);

    /**
     * <desc>
     *      检查套餐是否禁用
     * </desc>
     *
     * @param mealId 套餐编号
     * @return
     * @Author Zhu.yj
     * @createDate  2020/7/20
     */
    Integer checkMealStatus(String mealId);

}
